import { $freePost } from '@js/request'

export async function mobileLoginRequest (mobile, verification) {
  const res = await $freePost('/api/common/mobile_login', {
    mobile,
    verification
  })
  return res.data
}

export async function usernameLoginRequest (username, password) {
  const res = await $freePost('/api/common/user_login', {
    username,
    password
  })
  return res.data
}

export async function sendSMSRequest (mobile) {
  const res = await $freePost('/api/common/sms', {
    mobile,
    template_code: 'SMS_182920835'
  })
  return res.data
}
